package com.mjk.common.base.error;


import com.mjk.common.base.response.BeeResponse;
import lombok.Getter;

/**
 * bee 错误定义
 * @author msi
 *
 */
@Getter
public enum BeeError implements IError{
    SYSTEM_RETURN_DATA_IS_NULL(-916, "返回数据为空"),
	SYSTEM_GEN_CONF_IS_NULL(-915,"生成配置为空，请配置sc_genconf表"),
	SYSTEM_FILE_CONTEXT_IS_NULL(-914, "文件内容为空"),
	SYSTEM_HTTPS_INIT_ERROR(-913, "https初始化异常"),
	SYSTEM_URL_IS_NULL(-912, "请求地址不存在"),
	SYSTEM_SERVEIC_VERSION_IS_NULL(-911, "版本文件不存在"),
	SYSTEM_UPLOAD_FILE_IS_EMPTY(-910, "上传文件为空"),
	SYSTEM_WSDL_URL_ERROR(-909,"wsdl地址存在问题"),
	SYSTEM_IS_GENERATED(-908,"已经生成过"),
	SYSTEM_API_IS_CLOSE(-907,"接口关闭"),
	SYSTEM_INSTANCE_IS_NULL(-906,"请求中work为空"),
	SYSTEM_INTERFACE_PREMEISS_ERROR(-905,"接口权限错误"),
	SYSTEM_ERROR_CORN_ERROR(-904,"corn表达式错误"),
	SYSTEM_ERROR_SYNC_ENCY_CLASS_ERROR(-903,"推送加密类异常"),
	SYSTEM_ERROR_DELETE_FILE_ERROR(-901,"删除文件失败"),
	SYSTEM_ERROR_SQL_MATCH_ERROR(-902,"sql语句错误"),
	
	
	SCHEDULED_CHANNEL_INVOKER_ERROR(-806,"接口调用异常"),
	SCHEDULED_RUN_SINGLE_ERROR(-805,"分布式定时任务非本JVM执行"),
	SCHEDULED_STATUS_ERROR(-804,"接口状态错误"),
	
	TOKEN_IS_EXPRIE(-803,"token错误或过期 请重新登录"),
	TOKEN_IS_ERROR(-802, "token错误"),
	TOKEN_IS_NOT_EXIT(-801, "token不存在"),
	
	LOGIN_ERROR_ACCOUNT_NOT_EXIT(-701, "用户不存在"),
	LOGIN_ERROR_PWD_NOT_EXIT(-702,"密码不存在,请设置密码"),
	LOGIN_ERROR_PWD_ERROR(-703,"密码错误"),
    LOGIN_ERROR_CHECKCODE_ERROR(-704, "验证码错误"),
	LONIN_ERROR_NON_MODUL(-705, "未分配模块"),
    LONIN_ERROR_STATUS_ERROR(-706, "用户状态错误"),

	BEE_FAILD(-1,"失败"),
	BEE_SUC(1,"成功"),
	BEE_ERROR_FOR_ADMIN(-999,"服务端处理异常，请联系系统管理员排查！")
	;
	private final Integer code;
	
	private final String msg;
	
	BeeError(Integer code,String msg){
		this.code = code;
		this.msg = msg;
	}


    @Override
	public BeeResponse tranceError(Object o) {
		return tranceError(this.code, this.msg, o);
	}
	public BeeResponse tranceError() {
		return tranceError(this.code, this.msg, null);
	}
}
